package abmb.utils;

import java.util.Comparator;

/**
 * Date Comparator for microblog posts.
 * @author Andrea Balboni
 * @version 1.0
 */
public class DateComparator implements Comparator<MBPost>{
	 
    @Override
    public int compare(MBPost o1, MBPost o2) {
        return (o1.postDate().after(o2.postDate()) ? -1 : (o1.postDate().before(o2.postDate()) ? 1 : 0));
    }
}